package com.shadow.ai;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

@Slf4j
@SpringBootApplication
@ComponentScan(basePackages = { "com.shadow.ai"})
public class SpringAIApp {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(SpringAIApp.class, args);
        log.info("系统启动成功...");
        Environment env = run.getEnvironment();
        String port = env.getProperty("server.port");
        String path = env.getProperty("server.servlet.context-path");
        log.info("系统访问地址:http://localhost:{}{}", port, path);
    }
}
